
// 定义一个首页模块ts数据类型
export interface ResponseDate {
    code: number,
    message: string,
    ok: boolean
}
// 医院详情数据类型
export interface HospitalDetail {
    "bookingRule": {
        "cycle": number,
        "releaseTime": string,
        "stopTime": string,
        "quitDay": number,
        "quitTime": string,
        "rule": string[]
    },
    "hospital": {
        "id": string,
        "createTime": string,
        "updateTime": string,
        "isDeleted": number,
        "param": {
            "hostypeString": string,
            "fullAddress": string
        },
        "hoscode": string,
        "hosname": string,
        "hostype": number,
        "provinceCode": number
        "cityCode": number,
        "districtCode": number,
        "address": string,
        "logoData": string,
        "intro": string,
        "route": string,
        "status": number,
    }

}
// 医院详情返回数据ts
export interface HospitalDetail extends ResponseDate {
    data: HospitalDetail
}

//医院科室列表类型接口 
export interface HospitailDepartment {
    "depcode": string,
    "depname": string,
    "children"?: HospitailDepartment[]
}
// 代表存储科室数组类型
export type DepartmentArr = HospitailDepartment[];
// 获取科室返回数据类型接口
export interface DepartmentResponseData extends ResponseDate {
    data: DepartmentArr
}

// 用户登录接口需要携带参数类型
export interface loginData {
    phone: string,
    code: string
}
// 登录接口返回用户信息数据
export interface UserInfo {
    name: string,
    token: string
}
// 登录接口返回的数据的ts类型
export interface UserLoginResponseData extends ResponseDate {
    data: UserInfo
}

// 微信扫码登录返回的数据ts类型
export interface WXLogin {
    "redirectUri": string,
    "appid": string,
    "scope": string,
    "state": string
}
export interface WXLoginResponseData extends ResponseDate {
    data: WXLogin
}

// 科室票号数量返回数据的ts类型
export interface BaseMap {
    "workDateString": string,
    "releaseTime": string,
    "bigname": string,
    "stopTime": string,
    "depname": string,
    "hosname": string
}
export interface BookingScheduleList {
    "workDate": string,
    "workDateMd": string,
    "dayOfWeek": string,
    "docCount": number,
    "reservedNumber": number,
    "availableNumber": number,
    "status": number
}
export type bookingScheduleListArr = BookingScheduleList[];

export interface HospitalWorkResponseData extends ResponseDate {
    data: {
        total: number
        bookingScheduleList: bookingScheduleListArr
        baseMap: BaseMap
    }
}

// 获取 一个医生的数据
export interface Doctor {
    'id': string,
    "createTime": string,
    'updateTime': string,
    "isDeleted": number,
    "param": {
        "dayOfWeek": string,
        "depname": string,
        "hosname": string
    },
    "hoscode": string,
    "depcode": string,
    "title": string,
    "docname": string,
    "skill": string,
    "workDate": string,
    "workTime": number,
    "reservedNumber": number,
    "availableNumber": number,
    "amount": number,
    "status": number,
    "hosScheduleId": string
}
// 数组包含全部医生
export type DocArr = Doctor[];
//获取医生排班接口返回的数据
export interface DoctorResponseData extends ResponseDate {
    data: DocArr
}

// 获取就诊人的数据
export interface User {
    "id": number
    "createTime": string,
    "updateTime": string,
    "isDeleted": string,
    "param": {
        "certificatesTypeString": string,
        "contactsCertificatesTypeString": string,
        "cityString": null,
        "fullAddress": string,
        "districtString": null,
        "provinceString": null
    },
    "userId": number,
    "name": string,
    "certificatesType": string,
    "certificatesNo": string,
    "sex": number,
    "brithdate": string,
    "phone": string,
    "isMarry": number,
    "provinceCode": null,
    "cityCode": null,
    "districtCode": null,
    "address": string,
    "contactsName": string,
    "contactsCertificatesType": string,
    "contactsCertificatesNo": string,
    "contactsPhone": string,
    "isInsure": number,
    "cardNo": null,
    "status": string
}
export type UserArr = User[];
export interface UserResponseData extends ResponseDate{
    data:UserArr
}

// 获取某一个挂号医生数据详情
export interface DoctorInfoData extends ResponseDate{
    data:Doctor
}

// 定义Pinia仓库内部存储数据state的ts类型
export interface HospitalStore {
    hospitalInfo: HospitalDetail,
    departmentArr: DepartmentArr
}
// 定义Pinia用户仓库内部存储数据state的ts类型
export interface UserState {
    visiable: boolean,//用于控制登录组件的dialog显示与隐藏
    code: string,//存储用户验证码
    userInfo: UserInfo
} 